---
title: ComfyUI Setup
description: Requirements to use ComfyUI with Krita Diffusion plugin
---
import { LinkButton } from '@astrojs/starlight/components'
import ExternalLink from '../../components/ExternalLink.astro'

This guide is for those who want to use the Krita plugin with their custom
installation of <ExternalLink href="https://github.com/comfyanonymous/ComfyUI">ComfyUI</ExternalLink>.

When connecting via the "Custom Server" option, the plugin checks for a number
of custom node extensions and models which it requires to function. These are
listed below.

## Required custom nodes
Install custom nodes according to the instructions of the respective projects,
or use <ExternalLink href="https://github.com/ltdrdata/ComfyUI-Manager">ComfyUI Manager</ExternalLink>.

  * ControlNet preprocessors → <ExternalLink href="https://github.com/Fannovel16/comfyui_controlnet_aux">Fannovel16/comfyui_controlnet_aux</ExternalLink>
  * IP-Adapter → <ExternalLink href="https://github.com/cubiq/ComfyUI_IPAdapter_plus">cubiq/ComfyUI_IPAdapter_plus</ExternalLink>
  * Inpaint nodes → <ExternalLink href="https://github.com/Acly/comfyui-inpaint-nodes">Acly/comfyui-inpaint-nodes</ExternalLink>
  * External tooling nodes → <ExternalLink href="https://github.com/Acly/comfyui-tooling-nodes">Acly/comfyui-tooling-nodes</ExternalLink>

## Optional custom nodes
These nodes will be used by the plugin automatically if they are installed. They
extend functionality (eg. allowing to load additional model formats) but are not
required.

  * GGUF → <ExternalLink href="https://github.com/city96/ComfyUI-GGUF">city96/ComfyUI-GGUF</ExternalLink> - support loading .gguf models.
  * Nunchaku → <ExternalLink href="https://github.com/nunchaku-tech/ComfyUI-nunchaku">nunchaku-tech/ComfyUI-nunchaku</ExternalLink> - support loading Nunchaku svdq models.

## Required models
Some models are _required_ for the plugin to work - you cannot connect if they
are not found. They are used implicitly across various functionality and
pre-installing them makes for a smoother, uninterrupted experience.

All models must be placed in the appropriate ComfyUI models folder. The plugin
queries available models from the ComfyUI server. This means paths configured
in `extra_model_paths.yml` will also work.

Models can be downloaded and placed manually, or via script ([see below](#download-script)).

<LinkButton href="/models#downloading-models">Model list SDXL</LinkButton>
<LinkButton href="/models?arch-sd15=true&arch-sdxl=false#downloading-models">Model list SD1.5</LinkButton>
<LinkButton href="/models?arch-flux=true&arch-sdxl=false&kind-clip_vision=false&kind-upscaler=false&kind-inpaint=false&kind-checkpoint=true&set-optional=true#downloading-models">Model list Flux</LinkButton>
<LinkButton href="/models?arch-sdxl=false#downloading-models" variant="secondary">Model list (minimal)</LinkButton>

## Diffusion Model Checkpoints
At least one diffusion model (commonly just called "Checkpoint") is required.
There is a list with [recommended checkpoints](/models?set-optional=true&arch-sd15=true&arch-sdxl=true&arch-illu=true&kind-checkpoint=true&kind-controlnet=false&kind-clip_vision=false&kind-ip_adapter=false&kind-lora=false&kind-text_encoder=false&kind-vae=false&kind-inpaint=false&kind-upscaler=false#downloading-models) which are used by the plugin's
default styles. But they are not required, you can use any checkpoint you like
as long as the [base model](/base-models) is supported.

## Download Script
Instead of downloading models manually you can use the
[download_models.py](https://github.com/Acly/krita-ai-diffusion/blob/main/scripts/download_models.py)
script to fetch all required and optional models. This requires you to find the script
and execute Python from the command line.

After installing the plugin you can find the script in the plugin folder (called
`ai_diffusion`, see [Paths](/common-issues#file-locations)). Open a command
prompt and run:
```bash
python -m pip install aiohttp tqdm
python download_models.py --all /path/to/your/comfyui
```
This will download _all_ models supported by the plugin directly into the
specified folder with the correct version, location, and filename. The download
location does not have to be your ComfyUI installation, you can use an empty
folder if you want to avoid clashes and copy models afterwards. There are also
options to only download a subset, or list all relevant URLs without
downloading.
```bash
python download_models.py --help
```

_Note: The script downloads models only. It does not install or modify ComfyUI or custom nodes!_

## Troubleshooting
If you're getting errors about missing resources, or workload not being
installed, it's probably because one of the models wasn't found. You can find
the `client.log` file by clicking the ["View Log files"
link](/common-issues#log-files) in the Connection settings. Check the log for
warnings. Here you will also find which models were found in your installation,
and the patterns the plugin looks for.

Model filenames must contain one of the search patterns to match. The model
path is allowed to be longer though: you may place models in arbitrary
subfolders and they will still be found. If there are multiple matches, any
files placed inside a `krita` subfolder are prioritized.

### Questions and Support
* [ComfyUI](https://github.com/comfyanonymous/ComfyUI), [comfy.org](https://www.comfy.org) for issues related to ComfyUI
* [Discussions](https://github.com/Acly/krita-ai-diffusion/discussions), [Issues](https://github.com/Acly/krita-ai-diffusion/issues) or [Discord](https://discord.gg/pWyzHfHHhU) for things concerning the setup for Krita Diffusion Plugin
* Please **don't** use official Krita channels for questions related to the Plugin